import HttpKit from '@/utils/http-kit'

export default {
  /**
   * @description 返回小区标签列表
   * @returns {tagList}
   */
  getCommunityTagList () {
    return HttpKit.get('/communityManage/tags', {pageNumber: '0', pageSize: '10000'}).then(
      res => res.data
    )
  },
  /**
   * @description 添加小区标签
   * @param tag
   * @returns {}
   */
  addCommunityTag (tag) {
    return HttpKit.post('/communityManage/tag', {
      'id': 0,
      'tagInf': tag.info,
      'tagType': tag.type
    }).then(
      res => res.data
    )
  },
  /**
   * @description 删除小区标签
   * @param tagId
   * @returns {}
   */
  deleteCommunityTag (tagId) {
    return HttpKit.delete('/communityManage/tag/' + tagId, {}).then(
      res => res
    )
  }
}
